package com.example.customview;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.example.customview.databinding.ActivityMainBinding;

public class MainActivity extends AppCompatActivity {
    private ActivityMainBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityMainBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());

        binding.horizontalProgress.setProgressWithAnimation(60).setProgressListener(new HorizontalProgressBar.ProgressListener() {
            @Override
            public void currentProgressListener(float currentProgress) {

            }
        });
        binding.horizontalProgress.startProgressAnimation();

        binding.etSmsCode.setOnTextFinishListener(new CodeEditText.OnTextFinishListener() {
            @Override
            public void onTextFinish(CharSequence text, int length) {
                binding.etSmsCode.setEnabled(false);
            }
        });
    }
}